<?php
$_id=$_REQUEST['id'];

$link=db_connect();
$empire=new mysqlquery();
$_id=$_REQUEST[id];
$db='phome_jat_pic';
$dt=DbTouch($db,array('id'=>$_id));
$act=DbTouch($act_db,array('id'=>$dt[app_id]));
$listAll=DbTouchAll($db,array('app_type'=>ACT_ID_ROOT,'app_id'=>$dt[app_id],'app_sub_id'=>'11'),' id ',' order by time desc');
if(is_array($listAll)){
	$key=array_search(array('id'=>$_id),$listAll);
}
if($key!==false){
	$total=count($listAll);
	$currntIndex=$key+1;
	$pre_id=$listAll[$key-1]['id'];
	$next_id=$listAll[$key+1]['id'];
}
DbAddOne($db,array('id'=>$_id),'view_num');
include("../public_act_head.php");
?>
<input type='hidden' value='<?=$jatData["id"]?>'  id="artcile_id"/>
<input type='hidden' value='<?=$_id?>'  id="app_id"/>
<input type='hidden' value=''  id="session_id"/>
<input type='hidden' value='<?=$public_r['newsurl']?>'  id="newsurl"/>
<div class="popup-box" style="z-index:5000;display:none;">
	<table style="border:1px solid #999999;" cellspacing="0" cellpadding="0">
		<tr style="border:1px solid #999999;padding:0px;background:#2E80B2;"><td style="padding:0px;">		
			<div class="popup-top">
				<a class="popup-close" href="javascript:void(0);" onclick="popup_close();">&nbsp;</a>
				<div class="popup-title">发布预测</div>
			</div>
			</td></tr>
		<tr><td>
			<div class="popup-body"></div>
			<div class="popup-loading">加载中...</div>
		</td></tr>
	</table>
</div>
<div id="main">
 <div id="mainborder">
   <div id="leftcontents">
     <div class="content">
       <div class="title">
			<div style="float:left;">
				<a href='<?=$public_r[newsurl]?>/act/detail/?id=<?=$act[id]?>'><?=$act['title']?></a><h3>活动照片:</h3>
			</div>
			<div style="float:right;">
				<a href='<?=$public_r[newsurl]?>/act/detail/?v=ps&id=<?=$act[id]?>'>返回活动相册</a>
			</div>
		</div>
       <div class="body">
         <div class="a_content">
           <div class="l" style='width:100%;padding:10px;'>
				<div class='p-menu'>
					<div style='float:left;display:block;'>
						<span><?=$total?> 张照片中的第 <?=$currntIndex?>  张</span>
						<span><a href="./?v=ps&id=<?=$act[id]?>">返回相册</a></span>
					</div>
					<div  style='float:right;display:block;'>
					<?php if($pre_id){?>
						<a href="./?v=p&id=<?=$pre_id?>">上一页</a>
					<?php }
					if($next_id && $pre_id){echo '<span style="padding:0px 10px;">|</span>';}
					?>
					
					<?php if($next_id){?>
						<a href="./?v=p&id=<?=$next_id?>">下一页</a>
					<?php }?>						
					</div>
				</div>
           </div>          
           <div class="clear"></div>         
			<div class='list_act_pic_r' style='text-align:center;border:none;'>     
				<img src="<?=$public_r[newsurl].$dt[url]?>" id='img_show' />
			</div> 
			
			<div class='p-menu' style="padding:10px;">
					<div style="float:left;"><?php 
							$u=getUserInfo($act['userid']);		
							//print_r($u);
						?>
							<span>
								<a href='<?=$public_r[newsurl]?>e/member/sp/?uid=<?=$act[uid]?>'><?=$u[nickname]?></a>上传于<?=qtime($dt['time'])?>
							</span>
							<span>42次浏览 </span>
							<span>| <?=$act['comment_num']?>个评论</span>
							<span style='display:none;'>0人赞过</span>
						</div>
						<div  style="float:right;">
							<a href="<?=$public_r[newsurl].$dt[url]?>" target="_blank">查看原图</a>
						</div>
			</div>
	
         </div>
		 <div id='commentcontent'>
			<div id="comment_list">
				<div class="comments_text">
					<div class="t"><b>讨论：</b><span class='comment_num'>--</span>条评论,内容限制在200个字以内</div>
						<textarea class="textarea" class="comment-content" rows="10" maxLength='200' cols="10" con_type='<?=ACT_CMMNT_ID?>'></textarea>
					<div class="submitbtndiv">可快速答复<input type="button" class="submitbtn" value="发表评论" /></div>
					</div>
					<div class='list-c-items'>

					 </div>
            </div>
		</div>

       </div>

       <div class="bottom"></div>
     </div>
   </div>
   <div id="rightcontent">
		<?php 
		include("public_block_focus.php");
		?>    
		<?php 
		include("public_block_review.php");
		?>       
   </div>
   <div class="clear"></div>
 </div>

<?php 
	include("../public_act_foot.php");
?>
